//
//  ZCRegsitVCInputCell.m
//  ZCJZ
//
//  Created by sujeking on 2019/3/26.
//  Copyright © 2019年 jeking. All rights reserved.
//

#import "ZCRegsitVCInputCell.h"

@interface ZCRegsitVCInputCell() <UITextFieldDelegate>

@property (weak, nonatomic) IBOutlet UITextField *inputTF;

@end


@implementation ZCRegsitVCInputCell

- (void)awakeFromNib {
    [super awakeFromNib];
    [self setupSubViews];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

- (void)setupSubViews {
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    self.inputTF.delegate = self;
}


// MARK: - UITextFieldDelegate

- (void)textFieldDidEndEditing:(UITextField *)textField {
    if (self.endInputCallback) {
        self.endInputCallback(textField.text);
    }
}

- (void)setPlaceholder:(NSString *)placeholder {
    _placeholder = placeholder;
    self.inputTF.placeholder = placeholder;
}

@end
